Skip to main content

Integrating an attended RPA project with a Pega application

7 Tasks

45 mins

Pega Robotic Automation 22.1
Visible to: All users
Beginner Pega Robotic Automation 22.1 Robotic Process Automation English

Scenario

U+ Bank has developed a customer support application to process credit card transaction disputes. The application does not communicate easily with the Banker Insight application because of the difficulty in maintaining an API. The goal of the application is to streamline the time of the client and the CSR. The business requirement states that the CSR can copy and paste customer information from the customer support application into Banker Insight to perform a search, and then copy and paste the transaction information back into the UBank application to dispute the transaction. At this time, the portion of the application that collects the customer data in the customer support application is still in development, so you manually input the data first until that development finishes. The security and user credentials for accessing the Banker Insight application will be added after the basic search and retrieve functions are completed. Automations that create and parse the data to send back to the Pega application are in the starting project.

Complete the following tasks:

  • Add boolean exits and Message Manifest parameters for the Login application method automation, add then add logic if the login does not succeed.
  • Create an application method, Start Application, to confirm a running instance of Banker Insight on whether to start or log in to the application.
  • Update Customer Search automation to confirm the account is found, verified with the customer SSN, and exists using the record data from the UBank customer support application.
  • Create a sub-automation to retrieve the transactions from Banker Insight to the Pega application and close.
  • Create a robot activity automation that incorporates the other autos to complete the request.
  • Debug automations locally.
  • Test and run the package.

You must initiate your own Pega instance to complete this Challenge.

Initialization may take up to 5 minutes so please be patient.

Detailed Tasks

1 Add Boolean and Message Manifest exit parameters on Banker Insight Login application method

The modification of the Banker Insight Login automation checks to see if the login credentials are correct or not before exiting. Note that the third-party authentication automations are added later; therefore, the user credentials here are for debugging purposes only.

  1. Download the Attended RPA Challenge project: 
  2. Save the file to your desktop and unzip the file to extract the project folder to your C:\Users\<username>\Documents\Pega Robot Studio\Projects\.
  3. On the Home screen in Pega Robot Studio, click Open Project, and then navigate to the projects folder and open AttendedRPAChallenge.pegaproject
    Note: The starter project includes a configured BankerInsight application. The value of the Path field must match the location of BankerInsight on your local computer for the project to function properly. In the BankerInsight application, change the value of the Path to the location of your BankerInsight application.
  4. In Project Explorer, expand BankerInsight, click the Login automation. 
  5. On the automation surface, select the arrow between the btnLogin and txtCustNum.WaitForCreate, and then press the Delete key.
  6. On the btnLogin.PerformClick design block automation output, click and drag an automation link, and then release to open the Quick Add dialog box.
  7. In the Quick Add dialog box, click Toolbox > Data Handling > Strings > Compare > Equals, and then double-click the Equals method to add it to the automation.
  8. On the Palette, drag the lblNotification from the Banker Insight Login Form to the automation surface to open the Select Action dialog box.
  9. In the Select Action dialog box, add the Text property to the automation surface:
    1. Click More, and then click the Properties tab.
    2. Select the Text property, and then click Add.
  10. On the automation surface, click and drag an arrow from the lblNotification data output to the String.Equals.string1 data input.  
  11. On the String.Equals design block, configure the remaining two method parameters:
    1. Click string2, and then enter Invalid Credentials!
    2. Click stringComparisonType, and then select CurrentCultureIgnoreCase.
  12. On the automation, click and drag an arrow from the String.Equals False output to the txtCustNum.WaitForCreate input, as shown in the following figure: 
    A screenshot displaying the configured String Equals design block with its automation and data links.
  13. On the automation surface, update the design blocks with Message Manifest parameters:
    1. On the Exit label, click the Add icon, and then select String to add the parameter. 
    2. Click param1, and then enter msgDetails.
    3. On the Exit point, click the Add icon, and then select String to add the parameter​​​​​.
    4.  Click param1, and then enter msgDetails.
  14. On the automation surface, on the Jump To > Exit design block, click msgDetails, and then enter BI001
    A screenshot of the Exit label and Exit Point with the message details and status data connected.
  15. On the automation surface, right-click, click Jump To > Exit to add a new block, and then update the following parameters:
    1. In the Status list, select False
    2. Click msgDetails, and then enter BI002
  16. On the automation surface, click and drag an automation link from the String.Equals True output to the Jump To Exit design block with BI002, as shown in the following figure: 
    A screenshot showing the automation and data links between the Success and Failed labels and exit points
  17. In the Toolbar, click Save all.
  18. Debug the automation and modify the automation for each debugging run to validate all logical paths: 
    1. Right-click the first automation link, and then select Toggle Breakpoint to add a breakpoint to the automation.
    2. On the automation toolbar, click Test.
    3. If prompted in the Test debug dialog box, enter any necessary input parameters and ensure the selection of the Start applications before testing to start or not start the application automatically.
    4. On the automation toolbar, click the Step buttons to step through the automation.
    5. Repeat steps 18a-d to run the debug process and test other logical paths on the automation by changing input parameters or changing the starting of the application.  

2 Create the application method to check for a running instance of Banker Insight

This automation verifies whether Banker Insight is running. If it is not, start the application and wait for the LoginForm to match. If it is running, stop and then restart it so that it begins in the proper position.

  1. In Project Explorer, click the Start Application automation.
  2. On the automation surface, update the following design blocks with Message Manifest parameters:
    1. On the Exit label, click the Add icon twice.
    2. In the Type list of each, select String for one and Boolean for the other.
    3. For the string, click param1, and then enter msgDetails.
    4. For the boolean, click param2, and then enter status.
    5. On the Exit point, click the Add icon, and then click String to add the parameter.
    6. Click param1, and then enter msgDetails.
    7. On the Void type list, select Boolean.
  3. On the automation surface, click and drag a data link from the Exit Label msgdetails data output to the Exit Point String data input, as shown in the following figure:
    A screenshot of the Exit label and Exit Point with the message details and status data connected.
  4. On the automation, click and drag an automation link from the Run entry point automation output, and then release it to display the Quick Add dialog box.
  5. In the Quick Add dialog box, on the Palette, in the Applications section, add the following property to the automation surface:
    1. Double-click BankerInsight.
    2. In the Section action dialog box, click More, and then click the Properties tab.
    3. Select the IsRunning property, and then click Add.
  6. Double-click the automation surface to access the Quick Add dialog box, and then repeat steps 5a-5c to add the following design blocks to the automation surface:
    • BankerInsight Stop method.
    • BankerInsight Stopped event. 
  7. On the automation surface, right-click the Stopped block to display a context menu.
  8. On the context menu, click Wait for this event to convert the design block to a WaitForEvent method design block, as shown in the following figure: 
    An image showing the right-click menu from the Stopped event.
  9. On the automation surface, right-click, and then select Add > Label.
  10. On the Label design block, click Label1, and then enter Start.
  11. On the automation surface, right-click and select Jump To > Start and repeat to add a second Jump To Start.
  12. On the automation surface, create the following automation links: 
    1. Click and drag an automation link from the IsRunning.True output to the WaitForEvent input.
    2. Click and drag an automation link from with WaitForEvent.Setup output to the BankerInsight.Stop input.
    3. Click and drag an automation link from the WaitForEvent.Fired output to a Jump to Start input. 
    4. Click and drag an automation link from the IsRunning.False output to a Jump to Start input. 
      An image showing the automation links to check the status of the application and then start it.
  13. Double-click the automation surface to access the Quick Add dialog box, and then repeat steps 5a-5c to add the following design blocks to the automation surface:
    1. The BankerInsight Start method. 
    2. The LoginForm WaitForCreate method. 
  14. On the automation surface, right-click, and then select Jump To > Exit.
    1. On the Jump To Exit block, click status, and then select True.
  15. On the automation surface, right-click, and then select Jump To > Exit.
    1. On the Jump To Exit block, click status, and then select False.
    2. On the Jump To Exit block, click msgdetails, and then enter BI003.
  16. On the automation surface, click and drag an automation link from the Start label to the design blocks, as shown in the following figure to start the application and wait for the system to create the Login Form
    Note: If the Login form is created, then go to Success; otherwise, the automation fails.
    An image showing the automation links from the Start label
  17. On the Toolbar, click Save all, and then confirm that your automation matches the following figure:
    An image of the full Start Application automation.
  18. Debug the automation and modify the automation for each debugging run to validate all logical paths:
    1. Right-click the first automation link, and then select Toggle Breakpoint to add a breakpoint to the automation. 
    2. On the automation toolbar, click Test.
    3. If prompted in the Test debug dialog box, enter any necessary input parameters and ensure the selection of the Start applications before testing to start or not start the application automatically.
    4. On the automation toolbar, click the Step buttons to step through the automation.
    5. Repeat steps 18a-d to run the debug process and test other logical paths on the automation by changing input parameters or changing the starting of the application.  

3 Create application method to perform a customer search

This automation performs a search by using the customer number from the Pega application and wait for the text to change in the Search Message. If the automation finds the account, it confirms the account by comparing the last name and the last four digits of the social security number of the customer.

Note: This connection shortens the Banker Insight txtSSN to the last four characters and compares the SSNs and the last names. 
  1. In Project Explorer, click the Customer Search automation to display the Customer Search automation tab. 
  2. On the entry point, configure the entry point parameters:
    1. Click the Add icon, select a Sensitive Data parameter, click param1, and then enter custNumber. 
    2. Click the Add icon, select a String parameter, click param1, and then enter lastName. 
    3. Click the Add icon, select a Sensitive Data parameter, click param1and then enter persID.
  3. On the automation surface, configure the Exit label and Exit point:  
    1. On the Exit label, click the Add icon, select a String parameter, click param1, and then enter msgDetails
    2. Repeat step 3a to add a Boolean parameter as a status.
    3. On the Exit point, click the Add icon, select a String parameter, click param1, and then enter msgDetails.
    4. On the Exit point, click the Result parameter type drop-down, and select Boolean.
  4. On the automation surface, click and drag an automation link from the msgDetails data of the Exit label to the msgDetails data of the Exit point, and the status data of the Exit label to the Result data of the Exit point, as shown in the following figure:
    a screenshot of the connections between exit label and exit point with the message details and status parameters connected.
  5. On the Run entry point automation output, click and drag an automation link, and then release it to display the Quick Add dialog box.
  6. In the Quick Add dialog box, add the PerformClick method to the automation surface:
    1. On the Palette, in the Applications section, click BankerInsight > BankerInsight > grpClientDetail > btnClear.
    2. Double-click btnClear to display the Select Action dialog box.
    3. In the Select Action dialog box, click More, and then click the Methods tab.
    4. Select the PerformClick (no parameters) checkbox, and then click Add.
  7. Double-click the automation surface to open the Quick Add dialog box, and then add the following design block:
    1. On the Palette, in the Locals section, double-click custNumber to display the Select Action dialog box.
    2. In the Select Action dialog box, click More, and then the Properties tab.
    3. Select the This checkbox, and then click Add
  8. Repeat steps 7a-7c to add the following Property or Method design blocks:
    1. On the Palette, in the Applications section, add a txtCustNum.Text property.
    2. On the Palette, in the Applications section, add a lblSearchMessage.TextChanged event.
    3. On the Palette, in the Applications section, add a btnSearch.PerformClick method. 
    4. On the Palette, in the Applications section, add a lblSearchMessage.Text property. 
  9. Double-click the automation surface to access the Quick Add dialog box, and then add the following Strings.Equal design block:
    1. On the Toolbox, in the Data Handling section, click Strings > Compare > Equals
    2. Double-click Equals
  10. On the String.Equals block, update the parameters: 
    1. Click string2, and then enter Customer: Not Found!
    2. Click stringComparisonType, and then select CurrentCultureIgnoreCase.
  11. On the automation, add the following Label and Jump to pair: 
    1. Right-click the automation surface, select Add > Label, click Label1, and then enter CustCompare
    2. Right-click the automation surface, and then select Jump To > CustCompare
  12. On the automation surface, right-click the lblSearchMessage.TextChanged design block, and select Wait for this event.
  13. On the automation surface, click and drag automation and data links to perform a customer search:
    1. Connect the btnClear.PerformClick output to the txtCustNum.Properties input.
    2. Connect the custNumber.This data output to the txtCustNum.Text data input.
    3. Connect the txtCustNum.Properties output to the lblSearchMessage.TextChanged WaitForEvent input.
    4. Connect the lblSearchMessage.TextChanged Setup output to the btnSearch.PerformClick input.
    5. Connect the lblSearchMessage.TextChanged Fired output to the String.Equals input.
    6. Connect the lblSearchMessage.Text data output to the String.Equals data input.
    7. Connect the String.Equals False output, to the Jump To Cust Compare input.
  14. Confirm that your automation matches the following figure::
    An image showing the first automation design blocks and their automation and data links.
     
  15. Repeat steps 7a-7c to add the following Property and Method design blocks:
    1. On the Pallete, in the Locals section, add a persID.This property
    2. On the Pallete, in the Locals section, add a lastName property. 
    3. On the Pallete, in the Application section, add a txtSSN.Text property. 
    4. On the Pallete, in the Application section, add a txtLastName.Text property. 
    5. In the Toolbox, in the Data Handling, add a Strings.Find.Right method.
  16.  On the Strings.Right method, click the Length parameter, and then enter 4.
  17. On the String.Right design block, right-click on the Result data output, and select Extract Proxy.
    A screenshot showing the context menu from right-clicking the Result data output.
  18. On the Palette, in the Locals section, click and drag the StringProxy1 to the automation surface.
  19. In the Select action dialog box, click More > Method.
  20. In the results section, expand Equals, select the first Equals (1 parameters) option, and then click Add
  21. On the automation surface, click and drag an automation link from the CustCompare label to the automations and data connectors:
    1. Connect the Banker Insight txtSSN data output to the str data input to concatenate. 
    2. Connect the Strings.Right output to the persID.Properties input.
    3. Connect the persID.Properties output to the StringProxy1.Equals input.
    4. Connect the persID.Properties This data output to the StringProxy1.value data input.
    5. Connect the StringProxy1.Equals.True output to the txtLastName.Proprety input.
  22. On the txtLastName.Property.Text data output, click and drag a connector to access Select action dialog.
  23. On the Select action dialog, click More, and in the Search field enter Equal to filter the methods.
  24. From the filtered results, expand Equals, click the first Equals (1 parameters) option, and then click Add
  25. On the automation surface, click and drag automation and data links to complete the automation as shown in the following figure: 
    An image showing the automation with links from the Cust Compare label.
  26. On the automation surface, add the following three design blocks: 
    1. Right-click, select Jump To > Exit, click status, and then select True.
    2. Right-click, select Jump To > Exit, click msgDetails, and then enter BI004.
    3. On the Jump To Failed BI004 block, click status, and then select False
    4. Right-click and select Jump To > Exit twice, click msgDetails, and then enter BI005.
    5. On the Jump To Failed BI005 blocks, click status, and then select False
  27. On the automation surface, click and drag to draw an automation link:
    1. Connect the String.Equals True output to the Jump To Exit BI004 input. 
    2. Connect the StringProxy1.Equals False output to the Jump to Exit BI005 input.
    3. Connect the txtLastName.Equals True output to the Jump To Exit True input.
    4. Connect the txtLastName.Equals False output to the Jump to Exit BI005 input.
  28. On the Toolbar, click Save all, and then confirm that your automation matches the following figure:
    An image of the completed Customer Search automation.
     
  29. Debug the automation and modify the automation for each debugging run to validate all logical paths using the following steps: 
    1. Right-click the first automation link, and then select Toggle Breakpoint to add a breakpoint to the automation. 
    2. On the automation toolbar, click Test.
    3. If prompted in the Test debug dialog box, enter any necessary input parameters and ensure the selection of the Start applications before testing to start or not start the application automatically.
    4. On the automation toolbar, click the Step buttons to step through the automation.
    5. Repeat steps 29a-d to run the debug process and test other logical paths on the automation by changing input parameters or changing the starting of the application.  

4 Modify the ReadGrid automation to retrieve the transactions and to send to Pega application

The ReadGrid automation creates the new data type format to loop through the transaction rows and retrieve the data while adding it to the correct data type for return to the Pega application. The ReadGrid automation contains a subautomation that parses each data row into the correct JSON format and adds it to the newjArray data type. 

  1. On the Project tab, click the ReadGrid automation.
  2. On the automation surface, add and configure the following design blocks:
    1. Right-click and then select Add > Label.
    2. Click on the Label1 text and enter Loop.
    3. Right-click and then select Jump to > Loop.
    4. From the json.Properties output, draw a connector arrow to the Jump To > Loop input. 
  3. Double-click the automation surface to open the Quick Add dialog box, and then add the following design block:
    1. In the Applications section of the Palette, navigate to BankerInsight > BankerInsight1 > tabAccountMgmt > tabAccountTypes > dbvAcctTrans.
    2. Double-click dbvAcctTrans to open the Select Action dialog box.
    3. In the Select Action dialog box, click More, and then click the Properties tab.
    4. Select the RowCount checkbox, and then click Add
  4. In the Toolbox, click the Search field, and then enter Loop.
  5. In the list of results, click and drag the ForLoop component to the automation surface. 
  6. On the ForLoop design block in the automation, right-click Limit, and then select Reset Changes.  
  7. In the Locals section of the Palette, click and drag the ForLoop1 to the automation surface to add the Index property to the automation:
    1. In the Select Action dialog box, click More, and then click Properties.
    2. Select the Index checkbox, and then click Add.   
  8. On the ForLoop1 block, click and drag an automation link from the Yielded output, and then release it to display the Quick Add dialog box.
  9. In the Quick Add dialog box, add the following method to the automation surface:
    1. In the Applications section of the Palette, click BankerInsight > BankerInsight1 > tabAccountMgmt > tabAccountTypes > dbvAcctTrans.
    2. Double-click dbvAcctTrans to open the Select Action dialog box.
    3. In the Select Action dialog box, click More, and then click Methods.
    4. Select the GetCellValue checkbox, and then click Add
  10. On the dbvAcctTrans.GetCellValue design block, click column, and then enter 3
  11. On the automation surface, right-click the dgvAcctTrans.GetCellMethod block, and then select Copy.
  12. On the automation surface, right-click, and then click paste three times to add three instances of the dgvAcctTrans.GetCellMethod block for a total of four design blocks. 
  13. On the three new dgvAcctTrans.GetCellMethod blocks, repeat step 9 to edit the column parameter, and then enter the following values in each of the three-column indexes:
    • 2
    • 1
    • 0
  14. On the automation surface, click and drag an automation link to complete the following connections:
    1. Connect the Loop output to the ForLoop1.StartLoop input.
    2. Connect the GetCellValue.3 output to the GetCellValue.2 input.
    3. Connect the GetCellValue.2 output to the GetCellValue.1 input.
    4. Connect the GetCellValue.1 output to the GetCellValue.0 input, and then confirm that your automation matches the following figure:
      An image showing the added design blocks and the first two automation links starting from the Loop label.
  15. On the automation surface, click and drag to draw data links to set the loop limit and get the cell value from each column and row:
    1. From the dgvAccoutTrans.RowCount data output to the ForLoop1.StartLoop.Limit data input.
    2. From the ForLoop1.Properties.Index data output to the dgvAcctTrans.GetCellValue.Row data input.
    3. Repeat Step 14b to connect the three remaining dgvAcctTrans.GetCellValue.Row data inputs, and then confirm that your automation matches the following figure:
      An image showing the remaining automation and data links from the Loop label.
  16. On the automation surface, click and draw data links to send the result of each cell to its corresponding jObject_Parse input parameter:  
    1. Connect dgvAcctTrans.Column 0 to jObject_Parse.TransactionID
    2. Connect  dgvAcctTrans.Column 1 to jObject_Parse.Date
    3. Connect dgvAcctTrans.Column 2 to jObject_Parse.TxnDescription.
    4. Connect dgvAcctTrans.Column 3 to jObject_Parse.TxnAmount.
      An image showing the remaining data links from the 4 Get Cell Value blocks to the J Object Parse method.
  17. On Palette, in the Locals section, click and drag the json component to the automation surface, and then add its Value property.  
  18. On the automation surface, click and drag automation and data links as described as follows: 
    1. Connect the last GetCellValue.Column 0 output to the json.Value input. 
    2. Connect the json.Value output to the jObject_Parse.Run input. 
    3. Connect the json.Value data output to the jObject_Parse.Run.json data input. 
  19. On the automation surface, right-click, and then select Jump To > Success
  20. On the ForLoop1.StartLoop Completed output, click and drag an automation link to the Jump To.Success input. 
  21. On the automation toolbar, click Save All, and then confirm that your automation matches the following figure:
    An image showing the updated an completed Loop section of the Read Grid automation.
     
  22. Debug the automation and modify the automation for each debugging run to validate all logical paths using the following steps: 
    1. Right-click the first automation link, and then select Toggle Breakpoint to add a breakpoint to the automation.
    2. On the automation toolbar, click Test.
    3. If prompted in the Test debug dialog box, enter any necessary input parameters and ensure the selection of the Start applications before testing to start or not start the application automatically.
    4. On the automation toolbar, click the Step buttons to step through the automation.
    5. Repeat steps 21a-d to run the debug process and test other logical paths on the automation by changing input parameters or changing the starting of the application.  

5 Create a subautomation to check the credit card automation and call the ReadGrid subautomation

This automation confirms a credit card account with the customer, runs a subautomation that retrieves the credit card transactions, runs a subautomation that parses the data to the correct data format to return to the Pega application, and then clears the customer to prepare for the next transaction in Banker Insight. 

  1. In the Project Explorer, click Retrieve Transactions to open the automation. 
  2. On the automation surface, configure the following Success label and Success exit point.
    1. On the Success label, click the Add icon.
    2. In the Type drop-down box, select Browse....A Pick type dialog box is displayed.
    3. In the Search field, enter jarray
    4. In the results, left double-click JArray.
    5. For the JArray data type, click param1, and then enter jsonOutput 
    6. On the Success exit point, repeat steps 2a-2e. 
  3. On the automation surface, configure the following Failed label and Failed exit point.
    1. On the Failed label, click the Add icon, select a String parameter, click param1, and then enter msgDetails    
    2. On the Failed exit point, click the Add icon, select a String parameter, click param1, and then enter msgDetails  
  4. On the automation surface, click and drag an automation link to connect the string parameters from the labels to the exit points:
    1. Connect the Success label jsonOutput output to the Success exit point jsonOutput input.
    2. Connect the Failed label msgDetails output to the Failed exit point msgDetails input, and then confirm that your automation matches the following figure:
      An image showing the automation and data links between the Success and Failed labels and exit points
  5. On the Run entry point automation output, click and drag an automation link, and then release it to display the Quick Add dialog box.
  6. In the Quick Add dialog box, add the following property to the automation surface:
    1. On the Pallete, in the Application section, click BankerInsight > BankerInsight1 > tabAccountMgmt > tabAccountTypes > rbtnCreditCard.
    2. Double-click rbtnCreditCard to display the Select Action dialog box.
    3. In the Select Action dialog box, click More, and then click the Methods tab.
    4. Select the WaitForCreate (no parameters), and then click Add.
  7. On the automation surface, click and drag an automation link from rbtnCreditCard.WaitForCreate True automation output, and then release it.
  8. Repeat steps 6a-d to add the rbtnCreditCard.Enabled property, the rbtnCreditCard.CheckedChanged event, and the rbtnCreditCard.PerformClick method to the automation surface. 
  9. On the rbtnCreditCard.CheckedChanged event design block, right-click, and then select Wait for this event.
  10. Connect the designs blocks as in the following image:
    Connection of the Credit button checked wait for event design block.
  11. On the automation toolbar, click Include to open the Include in Palette dialog box.  
  12. In the Include in Palette dialog box, add ReadGrid automation:
    1. Click Automations.
    2. Click ReadGrid, and then click Add.
    3. Click Done.
  13. On the automation surface, click and drag an automation link from rbtnCreditCard.CheckChanged Fired automation output, and then release.
  14. Repeat steps 6a-d to add the ReadGrid.Run method to the automation surface from the Automations section of the Palette.
  15. On the automation surface, add the following design blocks:
    1. Right-click, and then select Jump To > Success.
    2. Right-click, and then select Jump To > Failed
    3. Repeat step 13b to add two more Jump To Failed blocks.
  16. On the automation surface for two of the Jump To Failed block, click msgDetails, and then enter BI006
  17. On the automation surface, click and drag automation and data links to complete the Boolean logic at each True/False endpoint:
    1. Connect the rbtnCreditCard.WaitForCreate False output to Jump To Failed BI006 input.
    2. Connect the rbtnCreditCard.Enabled False output to Jump To Failed BI006 input.
    3. Connect the ReadGrid.Run.Success output to the Jump To Success input.
    4. Connect the ReadGrid.Run.jsonOutput data output to the Jump To Success jsonOutput data input.
    5. Connect the ReadGrid.Run.Failed output to the Jump To Failed input.
    6. Connect the ReadGrid.Run.msgDetails data output to the Jump To Failed msgDetails input.
  18. On the Toolbar, click Save All, and then confirm that your automation matches the following figure:
    An image of the completed Retrieve transactions automation.
  19. Debug the automation and modify the automation for each debugging run to validate all logical paths using the following steps: 
    1. Right-click the first automation link, and then select Toggle Breakpoint to add a breakpoint to the automation. 
    2. On the automation toolbar, click Test.
    3. If prompted in the Test debug dialog box, enter any necessary input parameters and ensure the selection of the Start applications before testing to start or not start the application automatically.
    4. On the automation toolbar, click the Step buttons to step through the automation.
    5. Repeat steps 17a-d to run the debug process and test other logical paths on the automation by changing input parameters or changing the starting of the application.

6 Create robot activity automation that incorporates the other application methods and subautomations

This automation, starting with the robot activity, runs each application method and sub-automations to log in, search for the customer, retrieve the credit card transactions, and send all necessary data back to the Ubank customer support application. This automation version is developed for local debugging. The final version of this automation differs when it is ready to deploy to Pega Robot Manager.

  1. On the Project Explorer, click BankerInsight to open the Banker Insight application tab. 
  2. On the BankerInsight tab, in the Palette, click the Interface.
  3. In the Methods section, click CustomerSearch
  4. From the Visibility type list, select Public. 
    An image showing the Visibility setting for the Customer Search application method.
  5. In the Toolbar, click Save.   
  6. Repeat steps 2-4 for the two following application methods:
    • Login
    • Start Application
  7. In Project Explorer, click mainRetrieve Transacations to open the automation.
  8. On the Toolbar, click Include to open the Include in Palette dialog box.  
  9. In the Include in Palette dialog box, add the Retrieve Transactions automation:
    1. Click Automations.
    2. Click to highlight Retrieve Transactions, and then click Add.
    3. Click Done to close the Include in Palette dialog box.
  10. Double-click the automation surface to display the Quick Add dialog box.
  11. In the Quick Add dialog box, add the Start Application method from the Banker Insight application:
    1. On the Palette, in the Applications section, double-click the BankerInsight application to display the Select Action dialog box.
    2. In the Select Action dialog box, click More, and then click the Methods tab.
    3. Click Start Application, and then click Add.
  12. Repeat steps 10a-c to add the two following Banker Insight application methods: 
    • Login
    • Customer Search 
  13. On the automation surface, click and drag automation links for the following items:
    1. Connect the Run point to Start Application.
    2. Connect the True output to Login.
    3. Connect the True output to Customer Search
  14. On the BankerInsight.Login block, update the following parameters:
    1. Click Username, and then enter pega. 
    2. Click Password, and then enter pega
  15. In the BankerInsight.Customer Search block, update the following parameters: 
    Note: The hard coding of values is for local debugging only, where you can change these values to test the logical paths. The automation requires adjustment for further testing with a Security login and with the UBank Customer Support application. During before the project is deployed to production these values should be changed to Sensitive Data. 
    1. Click custNumber, and then enter 1234500078963456
    2. Click lastName, and then enter Connor
    3. Click persID, and then enter 2836, and then confirm that your automation matches the following figure:
      An image showing the first design blocks and automation links for the Main Retrieve Transactions automation.
  16. Double-click the automation surface to open the Quick Add dialog box.
  17. On the Quick Add dialog box, add the Run method for the Retrieve Transactions automation:
    1. On the Palette, in the Automations section, click and drag Retrieve Transactions to the automation surface.
    2. On the Select Action dialog box, click More, and then click the Methods tab.
    3. Click to select Run, and then click Add
  18. On the Toolbox, add a message box to display the transaction data returned from the Retrieve Transactions automation as follows:
    1. In the Search field, enter message.
    2. In the list of results, click and drag the ShowMessageBox method to the automation surface to open the Choose Method Overload dialog box.
    3. In the Choose Method Overload dialog box, select the second radio button, and then click Submit.
  19. On the automation surface, right-click, and then select Jump To > Success.
  20. On the automation surface, click and drag automation and data links: 
    1. Connect the BankerInsight.Customer Search.True output to the Retrieve Transactions input.
    2. Connect the Retrieve Transactions.Success output to the MessageBox.MessageBox input.
    3. Connect the Retrieve Transactions.jsonOutput data output to the MessageBox.message data input
    4. Connect the MessageBox.OK output to the Jump To Success input.
  21. On the Toolbar, click Save All, and then confirm that your automation matches the following figure:
    An image showing the last of the design blocks and links for the opening of the Main Retrieve Transaction automation.

7 Update the robot activity automation to add the completion of the robot activity status and information

This automation completes the mainRetrieve Transactions automation by adding the appropriate labels and exit points with parameters.

  1. On the automation surface, add and configure a label as follows:
    1. Right-click, and then select Add > Label.
    2. On the Label1 block, click Label1, and then enter ErrorMsg.
    3. On the ErrorMsg label, click the Add icon.
    4. In the Type list, select String.
    5. Click param1, and then enter msgDetails.
  2. On the automation surface, add the following parameters to the Failed label, and then configure the label:
    1. On the Failed Label, add a String parameter, and then enter msgDetails.
    2. On the Failed Label, add a Boolean parameter, and then enter result
  3. On the automation surface, right-click, and then select Jump To > ErrorMsg.
  4. Repeat step 3 to add three Jump To.ErrorMsg blocks. 
  5. On the automation surface, click and drag automation and data links:
    1. Connect the BankerInsight.Start Application False automation output to a Jump To.ErrorMsg label.
    2. Connect the BankerInsight.Start Application msgDetails data output to the Jump To.ErrorMsg msgDetails data input.
    3. Connect the BankerInsight.Login False automation output to a Jump To.ErrorMsg label.
    4. Connect the BankerInsight.Login msgDetails data output to a Jump To.ErrorMsg msgDetails data input.
    5. Connect the BankerInsight.Customer Search False automation output to a Jump To.ErrorMsg label.
    6. Connect the BankerInsight.Customer Search msgDetails data output to a Jump To.ErrorMsg msgDetails data input.
    7. Connect the Retrieve Transaction.Run Failed automation output to a Jump To.ErrorMsg label.
    8. Connect the Retrieve Transaction.Run msgDetails data output to a Jump To.ErrorMsg msgDetails data input, and then confirm that your automation matches the following figure:
      An image showing the automation and data links to the Jump To design blocks.
  6. On the automation surface, right-click, and then select Jump To > Failed
  7. On the Jump To Failed block, click result, and then select False.
  8. In the search field of the Toolbox, enter Message to filter the results. 
  9. In the Toolbox search results, in the MessageManifest folder, click and drag the GetMessageDetails method.
  10. Double-click the automation surface to open the Quick add dialog box.
  11. On the Palette, in the Locals section, double-click the ErrorMsg.msgDetails component to the automation surface.
  12. On the automation surface, click and drag automation and data links to complete the error message logic:
    1. Connect the ErrorMsg label output to the MessageManifest.GetMessageDetails.code input.
    2. Connect the ErrorMsg.msgDetails data output to the MessageManifest.GetMessageDetails code input.
    3. Connect the MessageManifest.GetMessageDetails output to the Jump To Failed input.
    4. Connect the ErrorMsg.msgDetails data output to the Jump To Failed.msgDetails data input, and then confirm that your automation matches the following figure:
      An image showing the design blocks and automation links starting at the Error Message label.
  13. On the Failed exit point, add a String parameter and change the Result to a Boolean:
    1. Click the Add icon.
    2. In the Type list, select String.
    3. Click param1, and then enter msgDetails.
    4. Click Void, and then select Boolean.
  14. On the automation surface, click and drag an arrow to connect the Failed label parameters to their corresponding Failed exit parameters. 
  15. On the Toolbar, click Save All, and then confirm that your automation matches the following figure:
    An image showing the completed main retrieve transactions automation.

Confirm your work

Since you have been debugging each automation along the way, this final verification is a check to ensure that all sub-automations and application methods, when strung together, do work according to the business requirements. You should run the ideal path and then begin checking for all alternative logical paths from the automations to ensure all links and connections are functioning together correctly. 

  1. On the Menu bar, click Debug > Delete all breakpoints.
  2. On the Project tabs, confirm you have the following objects opened. If you need to open either of the objects, click Projects and then click the name of the object(s) needed. 
    1. Banker Insight application
    2. mainRetrieve Transactions automation.
  3. In the Projects tab area, click mainRetrieve Transactions to activate the automation tab.
  4. On the Banker Insight.Customer Search design block, confirm the values as follows. Click each incorrect parameter and update its value.
    1. Click custumber, and then enter 1234500078963456.
    2. Click lastName, and then enter Connor.
    3. Click persID, and then enter 2836.
  5. On the Retrieve Transactions.Run design block, right-click jsonOutput parameter, and then select Advanced > Treat "jsonOutput" as > String.
    Tip: Since the Pega application requires the data type as an array, the data will not display in the message appropriately. So to debug and test for the correct collected data, you can change the data type to a string so that it will display in the Message Box. Remember to reset the data type back to its original state by repeating the step but selecting Advanced > Reset type for "jsonOutput".
    Exposed context menus to change the data type of the parameter.
  6. On the Toolbar, click Save all, and then click Test.
  7. On the mainRetrieve Transactions dialog box, click Test.
    the main retrieve transactions dialog box prior to starting the Test debug.
  8. On the Information dialog box, verify the transactions jsonObject from the Retrieve Transactions automation, and then click OK.
    the information message box displaying the transaction data from the json object
  9. On the Test Complete dialog box, check Close running programs, and then click Done.
    The test complete dialog box displaying the success of the initial ideal path test.
    Note: The previous steps are the ideal path testing scenario. To ensure that the final automation runs correctly and returns valid message codes, you will need to retest using different parameter values for different scenarios.
  10. Repeat steps 5-9 updating the values or selections as defined in the following table:
Test Description Values to Modify
Test for matching account but the incorrect account holder This test will confirm that the account matches but either the name or the personal id do not match Update a value from step 4b or 4c to ensure either the name is incorrect or the personal id is incorrect.
Test for account not found This test will confirm that no account exists  Update value from step 4a to ensure that automation correctly fails to find a matching account number
Test for matching account holder but without a credit card account  This test will confirm if a found account has a credit card account

Update the values in step 4 as follows:

  • custNumber is 40400015.
  • lastName is Hamilton.
  • persID is 8479.

 


This Challenge is to practice what you learned in the following Module:


Available in the following mission:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice